package com.yunji.order.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yunji.common.annotation.Excel;
import com.yunji.common.base.BaseDO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Project: yunji-coffee
 * @Package: com.yunji.order.domain
 * @Title: Refund
 * @Description: 退款列表信息
 * <p>
 * History:
 * Date                     Version     Author          Summary
 * ============================================================
 * 2024-04-18 19:51:24      V1.0        HuaAo       新建类
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "t_refund", description = "退款信息")
@TableName("t_refund")
@Data
public class RefundDO extends BaseDO implements Serializable {
    private static final long serialVersionUID = -5735197230138748441L;

    @TableId(type = IdType.AUTO)
    @Excel(name = "退款ID", width = 15)
    @ApiModelProperty("退款ID")
    private Long refundId;

    @Excel(name = "退款流水号", width = 15)
    @ApiModelProperty("退款流水号")
    private String refundCode;

    @ApiModelProperty("退款类型")
    private Integer refundType;

    @ApiModelProperty(value = "订单ID")
    @Excel(name = "订单ID", width = 5)
    private Long orderId;

    @Excel(name = "订单流水号", width = 20)
    @ApiModelProperty(value = "订单流水号")
    private String orderCode;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "申请时间", dateFormat = "yyyy-MM-dd HH:mm:ss", width = 30)
    @ApiModelProperty("申请时间/创建时间")
    private Date applyTime;

    @ApiModelProperty("申请原因code")
    private String applyReasonCode;

    @Excel(name = "申请原因", width = 15)
    @ApiModelProperty("申请原因")
    private String applyReason;

    @ApiModelProperty("拒绝原因/不通过原因")
    private String rejectReason;

    @Excel(name = "申请状态", readConverterExp = "0=待审核,1=待退款,-1=不通过,2=退款成功,-2=退款失败,-3=已取消", width = 15)
    @ApiModelProperty("申请状态 (0:待审核;1:待退款;-1:不通过;2:退款成功;-2:退款失败;-3:已取消)")
    private Integer applyStatus;

    @ApiModelProperty("问题描述 这个存快照")
    @NotNull(message = "问题描述不能为空")
    private String issue;

    @ApiModelProperty("问题图片数组")
    @NotNull(message = "问题图片数组不能为空")
    private String issuePics;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "取消时间", dateFormat = "yyyy-MM-dd HH:mm:ss", width = 30)
    @ApiModelProperty("取消时间")
    private Date closedTime;

    @ApiModelProperty("退款数量")
    private Integer refundNums;

    @Excel(name = "退款金额", width = 15)
    @ApiModelProperty("退款金额")
    private BigDecimal refundAmount;

    @ApiModelProperty("退款比例")
    private BigDecimal refundRatio;

    @Excel(name = "审核人ID", width = 15)
    @ApiModelProperty("审核人ID")
    private Long auditor;

    @Excel(name = "审核人名称", width = 15)
    @ApiModelProperty("审核人名称")
    private String auditName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "审核时间", dateFormat = "yyyy-MM-dd HH:mm:ss", width = 30)
    @ApiModelProperty("审核时间")
    private Date auditTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("退款完成时间")
    @Excel(name = "退款完成时间", dateFormat = "yyyy-MM-dd HH:mm:ss", width = 20)
    private Date finishTime;

    @Excel(name = "审核备注", width = 15)
    @ApiModelProperty("审核备注")
    private String auditRemark;

    @ApiModelProperty("是否取出商品 0 未取出 1 已取出")
    private Integer takenOut;

    @ApiModelProperty("是否返回库存 0 不返回 1 返回")
    private Integer auditBackStock;

    @ApiModelProperty("是否全部退款 0 否 1 是")
    private Integer wholeRefund;

    @ApiModelProperty("第三方退款code(微信)")
    private String wechatCode;

    @ApiModelProperty("退款时间(微信)")
    private Date wechatTime;

    private Long belongId;
}
